package com.ruoyi.web.core.config;

import com.ruoyi.exen.common.handler.WeChatHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 企业微信发送拦截器
 * @author EMY2305005
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Autowired
    private WeChatHandler weChatHandler;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(weChatHandler)
                .addPathPatterns("/qms/8d")
                .addPathPatterns("/qms/opl")
                .addPathPatterns("/qms/apqp")
                .addPathPatterns("/qms/material");//拦截所有的路径
    }

}
